package com.frossini.proyectologin;

import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class ProyectoLoginPrincipal extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_proyecto_login_principal);
        final EditText edit1 = (EditText) findViewById(R.id.edt_usuario);
        final EditText edit2 = (EditText) findViewById(R.id.edt_contrasenia);
        Button boton = (Button) findViewById(R.id.btn_entrar);
        boton.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				//verificarlogin(edit1.getText().toString(), edit2.getText().toString());
				
				iniciarsinlogin();
			}
		});
        
    }

    
    public void verificarlogin(String xedit1,String xedit2) 
    {
    	if (xedit1.equals("FROSSI") & xedit2.equals("FROSSI")) {
    		 Intent intent = new Intent(this,MainActivityTareas.class);
			 startActivity(intent);
			 finish();
		} else {
			 Toast.makeText(this, "No entras",Toast.LENGTH_LONG ).show();

		}
    	
    }
    private void iniciarsinlogin ()
    {
   	 //Intent intent = new Intent(this,MainActivityTareas.class);
   	 Intent intent = new Intent(this,PrincipalActivity.class);
	 startActivity(intent);
	 finish();
    }
}
